package com.xhwl.centiotdata.handler.eesd.impl;

import com.xhwl.centiotdata.handler.eesd.EesdFactory;
import com.xhwl.centiotdata.handler.eesd.EesdHandler;
import com.xhwl.centiotdata.pojo.dto.eesd.EesdConfigDTO;
import com.xhwl.centiotdata.pojo.enums.eesd.EesdMethodEnum;
import com.xhwl.centiotdata.suppliersystem.eesd.hwweather.HwWeatherHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author： lianghz
 * @Description：
 * @Date 2021/09/06/ 11:31
 */
@Slf4j
@Service
public class EesdHuaWeiWeatherHandler extends EesdHandler {

    @Autowired
    private HwWeatherHandler hwWeatherHandler;


    /**
     * id:产品id，来源cent_device库中device_product表中的数据
     */
    @Override
    public void afterPropertiesSet() {
        EesdFactory.register(EesdMethodEnum.WEATHER.getId(), this);
    }

    @Override
    public void pullRecord(EesdConfigDTO eesdConfigDTO) {
        hwWeatherHandler.weatherTask(eesdConfigDTO);
    }

}
